<?php
/**
{
    "goldLogId": "INT //日志id",
    "uid": "INT //用户@foreign::tbl_user; @noload; @search; ",
    "gold": "INT //金币",
    "schoolId": "INT //机构@foreign::tbl_school; ",
    "reason": "VARCHAR //变动原因",
    "info": "VARCHAR //链接信息",
    "url": "VARCHAR //链接地址",
    "img": "VARCHAR //图片@image; ",
    "ip": "VARCHAR //ip@noload; ",
    "created": "DATETIME //创建日期@noload; "
}
 */

class GoldLog extends Base
{
    
	private $goldLogId= '';//日志id
	private $uid= '';//用户@foreign::tbl_user;@noload;@search;
	private $gold= '';//金币
	private $schoolId= "0";//机构@foreign::tbl_school;
	private $reason= NULL;//变动原因
	private $info= NULL;//链接信息
	private $url= NULL;//链接地址
	private $img= NULL;//图片@image;
	private $ip= NULL;//ip@noload;
	private $created= 'CURRENT_TIMESTAMP';//创建日期@noload;

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_gold_log';
    }
    
    public  function key(){
        return 'goldLogId';
    }


    
    public static  function hideField()
    {
        return [];
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return [];
    }
            
    public static  function jsonField()
    {
        return [];
    }
            
    public static  function noLoadField()
    {
        return [];
    }
            
    public static  function deleteField()
    {
        return [];
    }
            
    public function className()
    {
        return 'GoldLog';
    }
    
    public  function field()
    {
        return array (  'goldLogId' =>   array (    0 => 'INT',    1 => 11,    2 => '日志id',  ),  'uid' =>   array (    0 => 'INT',    1 => 11,    2 => '用户@foreign::tbl_user;@noload;@search;',  ),  'gold' =>   array (    0 => 'INT',    1 => 11,    2 => '金币',  ),  'schoolId' =>   array (    0 => 'INT',    1 => 11,    2 => '机构@foreign::tbl_school;',  ),  'reason' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '变动原因',  ),  'info' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '链接信息',  ),  'url' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '链接地址',  ),  'img' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '图片@image;',  ),  'ip' =>   array (    0 => 'VARCHAR',    1 => 15,    2 => 'ip@noload;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '创建日期@noload;',  ),);
    }


}